import request from '@/utils/request'
import {getToken} from '@/utils/auth'
var token = getToken()
//机构列表
export function getHospitalList() {
  return request({
    url: '/hospital/list',
    method: 'get',
  })
}
//分页列表
export function getHospitaPagelList(data,pageData) {
  return request({
    url: '/hospital/page/'+pageData.pageNo+'/'+pageData.pageSize,
    method: 'post',
    data
  })
}
//科室列表
export function getHosPartList() {
  return request({
    url: '/hosPart/list',
    method: 'get',
  })
}

//新增
export function getHospitalAdd(data) {
    return request({
      url: '/hospital/add',
      method: 'post',
      data
    })
  }

// 修改
export function getHospitalUpdate(data) {
    return request({
      url: '/hospital/update',
      method: 'post',
      data
    })
  }


// 查看
export function getHospitalDetail(id) {
    return request({
      url: '/hospital/detail/'+id,
      method: 'get',
    })
  }

// 删除
export function getHospitalDelete(id) {
    return request({
      url: '/hospital/delete/'+id,
      method: 'get',
    })
  }
  
  export function getHosPartIdList(id) {
    return request({
      url: '/hosPart/list/by/'+id,
      method: 'get',
    })
  }

